﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace NLBS.Entity
{
    /// <summary>
    /// Base interface for paged collections.
    /// </summary>
    public interface IPagedCollection
    {
        /// <summary>
        /// The Total number of items being paged through.
        /// </summary>
        int MaxItems
        {
            get;
            set;
        }
    }

    /// <summary>
    /// Base interface for generic paged collections.
    /// </summary>
    public interface IPagedCollection<T> : IList<T>, IPagedCollection
    { }

    /// <summary>
    /// Concrete generic base class for paged collections.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class PagedCollection<T> : List<T>, IPagedCollection<T>
    {
        private int maxItems;

        /// <summary>
        /// Returns the max number of items to display on a page.
        /// </summary>
        public int MaxItems
        {
            get { return this.maxItems; }
            set { this.maxItems = value; }
        }
        public PagedCollection() { }
        public PagedCollection(IEnumerable<T> list): base(list)
        {

        }

        
        
    }
}
